<?php
require_once $_SERVER['DOCUMENT_ROOT'] . '/wp-config.php';
require_once 'class/album.php';
$action = $_POST['action'];

switch($action){
	
	case 'create_album':
		new_album();
		break;
} 
 
function new_album(){
	global $wpdb;
	$name = $_POST['album_name'];
	$album = new album($wpdb);
	$album->newAlbum($name);
	$album->getAlbumsList();
}

?>